package com.adminsystem.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.adminsystem.mapper.BusWebsiteMapper;
import com.adminsystem.entity.BusWebsite;
import com.adminsystem.service.IBusWebsiteService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 网址收录Service业务层处理
 * 
 * @author admin
 * @date 2023-11-19
 */
@Service
public class BusWebsiteServiceImpl extends ServiceImpl<BusWebsiteMapper, BusWebsite> implements IBusWebsiteService
{
    @Autowired
    private BusWebsiteMapper busWebsiteMapper;

    /**
     * 查询网址收录
     * 
     * @param id 网址收录主键
     * @return 网址收录
     */
    @Override
    public BusWebsite selectBusWebsiteById(Long id)
    {
        return busWebsiteMapper.selectBusWebsiteById(id);
    }

    /**
     * 查询网址收录列表
     * 
     * @param busWebsite 网址收录
     * @return 网址收录
     */
    @Override
    public List<BusWebsite> selectBusWebsiteList(BusWebsite busWebsite)
    {
        return busWebsiteMapper.selectBusWebsiteList(busWebsite);
    }

    /**
     * 新增网址收录
     * 
     * @param busWebsite 网址收录
     * @return 结果
     */
    @Override
    public int insertBusWebsite(BusWebsite busWebsite)
    {
        busWebsite.setCreateTime(DateUtils.getNowDate());
        return busWebsiteMapper.insertBusWebsite(busWebsite);
    }

    /**
     * 修改网址收录
     * 
     * @param busWebsite 网址收录
     * @return 结果
     */
    @Override
    public int updateBusWebsite(BusWebsite busWebsite)
    {
        busWebsite.setUpdateTime(DateUtils.getNowDate());
        return busWebsiteMapper.updateBusWebsite(busWebsite);
    }

    /**
     * 批量删除网址收录
     * 
     * @param ids 需要删除的网址收录主键
     * @return 结果
     */
    @Override
    public int deleteBusWebsiteByIds(Long[] ids)
    {
        return busWebsiteMapper.deleteBusWebsiteByIds(ids);
    }

    /**
     * 删除网址收录信息
     * 
     * @param id 网址收录主键
     * @return 结果
     */
    @Override
    public int deleteBusWebsiteById(Long id)
    {
        return busWebsiteMapper.deleteBusWebsiteById(id);
    }
}
